/**
 * @file   MiraMXS.h
 * @author Josep Sabater (jsabaterm@el.ub.edu)
 * @date   November, 2016
 * @version 1.0.0
 * @ingroup QMira
 * @brief  MXS system containing all arms
 *
 */
#ifndef MIRA_MXS_H
#define MIRA_MXS_H

#include <vector>
#include "MiraIRobot2D.h"
#include "MiraMXSLens.h"

#include <MiraPlacement2D.h>

namespace QMira {
    
    class MXS {
    public:
        
            /**
         * @brief Constructor of MXSCtrl
         * @param pos Position and orientation of the MXS frame
         * according to the worldFrame
         * @param numArm number of arms in the system.
         * @param armType type of the arm.
         * @param dims physical dimensions of the system.
         * @param orientRobot0 orientation (radians) of the robot 0.
         */
        MXS(const MiraGeometryLib::Placement2D &location,
            const MXSLens &dims,
            const unsigned int nRobots);
        
        unsigned int numRobots() const { return robotCont_.size(); }        
        const IRobot2D& getRobot(const unsigned int robotId) const;
        
    private:
        MXSLens dims_;
        std::vector<IRobot2D::IRobot2DUniquePtr_t> robotCont_;
        bool isRobotValid_(const unsigned int robotId) const;
    };
}

#endif /*MIRA_MXS_H*/